// Copyrights by Kenneth Lee, 2022. All Rights Reserved

#ifndef __FLOAT_VAL_HPP__
#define __FLOAT_VAL_HPP__

#include <iostream>
#include <assert.h>

#include "valif.hpp"

class FloatVal: public ValIf {
private:
	float v;		//Value as float
public:
	FloatVal(int i);
	FloatVal(const char *s);
	FloatVal();
	friend ostream & operator<<(ostream & os, const FloatVal & fv);
	friend bool operator==(const FloatVal &l, const FloatVal &r);
	friend FloatVal operator+(const FloatVal &l, const FloatVal &r);
	friend FloatVal operator-(const FloatVal &l, const FloatVal &r);
	friend FloatVal operator*(const FloatVal &l, const FloatVal &r);
	friend FloatVal operator/(const FloatVal &l, const FloatVal &r);
	FloatVal &operator=(const char *s);
};

extern bool operator==(const FloatVal &l, const FloatVal &r);
extern FloatVal operator+(const FloatVal &l, const FloatVal &r);
extern FloatVal operator-(const FloatVal &l, const FloatVal &r);
extern FloatVal operator*(const FloatVal &l, const FloatVal &r);
extern FloatVal operator/(const FloatVal &l, const FloatVal &r);
#endif
